﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WPay.Domain.Model.DTOs
{
    /// <summary>
    /// Token数据模型
    /// </summary>
    public class TokenDTO
    {
        /// <summary>
        /// 应用ID
        /// </summary>
        public string AppId { get; set; }
        /// <summary>
        /// 应用密钥
        /// </summary>
        public string AppSecret { get; set; }

        /// <summary>
        /// Token授权码
        /// </summary>
        public string Token { get; set; }

        /// <summary>
        /// 应用类型
        /// </summary>
        public string AppType
        {
            get { return _appType ?? "WECHAT_UI"; }
            set => _appType = value;
        }
        private string _appType;
        /// <summary>
        /// Token有效时长（单位：秒）
        /// 默认 3600秒
        /// </summary>
        public int Expires
        {
            get { if (_expires == 0) return 3600; return _expires; }
            set => _expires = value;
        }
        private int _expires;
    }
}
